package router

import (
	"github.com/gin-gonic/gin"
	"new/handlers"
)

func Init() *gin.Engine {
	r := gin.Default()
	r.POST("add", handlers.Add)
	r.GET("list", handlers.List)
	r.POST("newsadd", handlers.NewsAdd)
	r.GET("newlist", handlers.NewsList)
	r.Run(":8000")
	return r
}
